<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <?php if(is_array($filesnames)): foreach($filesnames as $key=>$v): ?><div style="display:inline-block;width:200px; padding:20px;">
      <img src="/Public/img/bg-purchase.png " alt="" width="200" height="200"  data-original="/Public/img/<?php echo ($v); ?>"  >
      <?php echo ($v); ?> <?php $name=explode('.',$v); ?> <a href="<?php echo U('Img/del',array('name'=>$name[0],'type'=>$name[1]));?>">删除</a>
    </div><?php endforeach; endif; ?>
  <form action="<?php echo U('Img/upload');?> " enctype="multipart/form-data"  method="post" style="display:inline-block;width:200px; padding:20px;">
    <input type="file" name="img" >
    <button type="submit">上传</button>
  </form>
  <script src="/Public/js/vendor/jquery.min.js" charset="utf-8"></script>
  <script src="//cdn.bootcss.com/jquery_lazyload/1.9.7/jquery.lazyload.min.js"></script>
  <script>
  $(function() {
    $("img").lazyload({
      effect : "fadeIn"
      });
  });
  </script>
</body>
</html>